home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
rbsetnv1.zip
/
GETSWITC.C
< prev
next >
Wrap
Text File
|
1990-04-10
|
438b
|
26 lines
#include <stdio.h>
#include <dos.h>
static char SW = 0; /* DOS switch character, either '-' or '/' */
int getswitch()
{
if (SW == 0) {
/* get SW using dos call 0x3700 */
_AX = 0x3700;
geninterrupt(0x21);
SW = _DL;
}
return( SW & 0xFF );
}
int setswitch(char c)
{
/* set SW using dos call 0x3701 */
_AX = 0x3701;
_DL = c;
geninterrupt(0x21);
SW = c;
return( SW & 0xFF );
}